import { createSSRApp } from 'vue';

import VxeUI from '@/components/q-table/render';
import plugin from '@/plugin';
import VxeUIPluginRenderNaive from '@vxe-ui/plugin-render-naive';
import '@vxe-ui/plugin-render-naive/dist/style.css';
import * as Pinia from 'pinia';
import 'vxe-pc-ui/lib/style.css';
import VxeUITable from 'vxe-table';
import 'vxe-table/lib/style.css';

import App from './App.vue';
import i18n from './i18n';

VxeUI.use(VxeUIPluginRenderNaive);

export function createApp() {
	const app = createSSRApp(App);
	app.use(i18n);
	app.use(VxeUI).use(VxeUITable);
	app.use(plugin);

	return {
		app,
		Pinia,
	};
}
